1. Field of the Invention
The present invention relates to a microcomputer with a built-in electrically rewritable nonvolatile memory, and more specifically to a microcomputer operable even when the supply voltage is lower than the lower operating voltage limit of the built-in nonvolatile memory.
2. Description of the Background Art
For performing system development using incorporated microcomputers, microcomputers with a built-in flash EEPROM (Electrically Erasable Programmable Read-Only Memory), which is one type of electrically rewritable nonvolatile memory, are often used in order to facilitate program changes and to shorten the period of development. However, microcomputers with a built-in flash EEPROM are more expensive than microcomputers which do not allow programs thereinto be rewritten (for example, microcomputers with a mask ROM). For this reason, in order to shorten the period of development and also reduce the mass production cost, a microcomputer with a built-in flash EEPROM is used for program development whereas a microcomputer with a built-in mask ROM is used for mass production in some occasions. In other occasions, in order to start mass production at the earliest possible time, the production of microcomputers with a built-in mask ROM is started when program development is completed, while mass production using a microcomputer with a flash EEPROM is performed until the production of the microcomputers with a built-in mask ROM is completed.
In general, the operating voltage range of a flash EEPROM is narrower than that of a mask ROM. Therefore, system development and mass production using both a microcomputer with a built-in flash EEPROM and a microcomputer with a built-in mask ROM may cause a problem in that the two types of microcomputers perform different operations due to the different operating voltage ranges.
As a microcomputer with a built-in flash EEPROM operable even when the supply voltage is lower than the lower operating voltage limit of the flash EEPROM, a microcomputer described in Japanese Laid-Open Patent Publication No. 2002-7374 is conventionally known. In general, the operating voltage range of a RAM is wider than that of a flash EEPROM. Therefore, the microcomputer described in Japanese Laid-Open Patent Publication No. 2002-7374 includes a RAM for storing a part of a program, and is provided with a supply voltage which is lower than the lower operating voltage limit of the built-in flash EEPROM. The microcomputer internally boosts the provided supply voltage and transfers the program stored in the flash EEPROM to the RAM. After the transfer of the program, the microcomputer stops boosting the voltage and executes the program stored in the RAM. Thus, the power consumption of the microcomputer can be reduced.
However, with the above-described conventional microcomputer with a built-in flash EEPROM, the central processing unit (hereinafter, referred to as a “CPU”) needs to be stopped when transferring the program stored in the flash EEPROM. By contrast, with a microcomputer with a built-in mask ROM, the program does not need to be transferred and so the CPU does not need to be stopped. Therefore, in system development and mass production using both the above-described conventional microcomputer with a built-in flash EEPROM and a microcomputer with a built-in mask ROM, the operations of the two types of microcomputers cannot be matched although the two types of microcomputers can be operated at the same supply voltage.
With the conventional microcomputer with a built-in flash EEPROM, for rewriting the program stored in the flash EEPROM 20, it is necessary to use the CPU exclusively for that operation. Thus, it is impossible to rewrite the program stored in the flash EEPROM without stopping the CPU.